function regist() {
		var user_name;
		var user_password;
		var xmlhttp;
		var xmlhttp = new XMLHttpRequest();

		xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				if (xmlhttp.responseText == 1) {
					alert("注册成功");
					location.href = '/index/index/index';
				}else{
					alert("注册失败,请重新注册");
					location.href = '/index/index/index';
				}
			}
			;
		}
		xmlhttp.open("POST", "/index/index/regist", true);
		xmlhttp.setRequestHeader("Content-type",
				"application/x-www-form-urlencoded");
		user_name = document.getElementById("user_name");
		user_password = document.getElementById("user_password");

		xmlhttp.send("user_name=" + user_name.value + "&user_password="
				+ user_password.value);
	}